import { http } from "@/utils/http";

export type ResidentInfo = {
  id: number;
  sex: string;
  name: string;
  partId: number;
  phone: string;
  detailAddress: string;
};

export type GetResidentResult = {
  total: number;
  list: Array<ResidentInfo>;
};

/** 登录 */
export const getResidentInfo = params => {
  return http.request<GetResidentResult>("get", "/api/manager/view/user", {
    params
  });
};

export const queryResidentInfoByPhone = params => {
  return http.request<GetResidentResult>(
    "get",
    "/api/manager/view/userByNumber",
    {
      params
    }
  );
};
